python remove all except numbers

31

>>> import re
>>> re.sub('\D', '', 'aas30dsa20')
'3020'

Comments

Submit
0 Comments